package main

import "fmt"

// 接口的嵌套
type MyWriter interface {
	Writer(string)
}

type MyReader interface {
	Reader() string
}

type MyReaderWriter interface {
	MyWriter
	MyReader
	ReadWrite()
}

type SreadWriter struct{}

func (s *SreadWriter) Writer(s2 string) {
	//TODO implement me
	fmt.Println("Writer")

}

func (s *SreadWriter) Reader() string {
	//TODO implement me
	fmt.Println("Reader")

	return "reader"
}

func (s *SreadWriter) ReadWrite() {
	//TODO implement me
	fmt.Println("ReadWrite")
}

func main() {
	var mrw MyReaderWriter = &SreadWriter{}
	mrw.Reader()
}
